package cn.iocoder.yudao.module.crossborder.platform.controller.admin.platformproductmapping.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 跨境电商平台产品映射新增/修改 Request VO")
@Data
public class PlatformProductMappingSaveReqVO {

    @Schema(description = "映射编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "31281")
    private Long id;

    @Schema(description = "平台编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7145")
    @NotNull(message = "平台编号不能为空")
    private Long platformId;

    @Schema(description = "店铺编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "19958")
    @NotNull(message = "店铺编号不能为空")
    private Long storeId;

    @Schema(description = "本地产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25488")
    @NotNull(message = "本地产品ID不能为空")
    private Long localProductId;

    @Schema(description = "本地SKU", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "本地SKU不能为空")
    private String localSku;

    @Schema(description = "平台产品ID", example = "27936")
    private String platformProductId;

    @Schema(description = "平台SKU")
    private String platformSku;

    @Schema(description = "平台listing ID", example = "12597")
    private String platformListingId;

    @Schema(description = "平台ASIN（Amazon）")
    private String platformAsin;

    @Schema(description = "平台商品ID（eBay等）", example = "25546")
    private String platformItemId;

    @Schema(description = "平台变体ID（Shopify等）", example = "6119")
    private String platformVariantId;

    @Schema(description = "映射状态（0未映射 1已映射 2映射失败 3已下架）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "映射状态（0未映射 1已映射 2映射失败 3已下架）不能为空")
    private Integer mappingStatus;

    @Schema(description = "同步状态（0未同步 1同步中 2同步成功 3同步失败）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "同步状态（0未同步 1同步中 2同步成功 3同步失败）不能为空")
    private Integer syncStatus;

    @Schema(description = "最后同步时间")
    private LocalDateTime lastSyncTime;

    @Schema(description = "同步错误信息")
    private String syncErrorMsg;

    @Schema(description = "平台商品链接", example = "https://www.iocoder.cn")
    private String platformUrl;

    @Schema(description = "平台商品状态", example = "2")
    private String platformStatus;

    @Schema(description = "平台价格", example = "18366")
    private BigDecimal platformPrice;

    @Schema(description = "平台货币")
    private String platformCurrency;

    @Schema(description = "平台库存数量")
    private Integer platformInventory;

    @Schema(description = "是否自动同步", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否自动同步不能为空")
    private Boolean autoSync;

}